package com.gitee.wsl.struct.grammar.ast.render.tag.provider


import com.gitee.wsl.struct.grammar.ast.node.ASTNode
import com.gitee.wsl.struct.grammar.ast.render.tag.TagVisitor
import com.gitee.wsl.struct.grammar.ast.render.provider.OpenCloseGeneratingProvider

open class SimpleTagProvider<V: TagVisitor>(val tagName: String) : OpenCloseGeneratingProvider<V>() {
    override fun openTag(visitor: V, text: String, node: ASTNode) {
        visitor.consumeTagOpen(node, tagName)
    }

    override fun closeTag(visitor: V, text: String, node: ASTNode) {
        visitor.consumeTagClose(tagName)
    }

}